home *** CD-ROM | disk | FTP | other *** search
Wrap
Attribute VB_Name = "Module1" Public Message(2) As Boolean Public r2, r3, g2, g3, b2, b3 As Integer Public Sub MBox(MObj As Form, Mtxt As String, Mbut0 As String, Mbut1 As String, Mbut2 As String, Micon As Integer, Mtitle As String, MR As Integer, MG As Integer, MB As Integer, Mfont1 As String, Mfont2 As String, MposX As Integer, MposY As Integer) ' 1 = question ' 2 = info ' 3 = exlamation ' 4 = critical ' 5 = disk ' 6 = folder ' 7 = printer ' 8 = write ' 9 = trash Message(0) = False Message(1) = False Message(2) = False With MObj r2 = MR + 50: If r2 > 255 Then r2 = 255 g2 = MG + 50: If g2 > 255 Then g2 = 255 b2 = MB + 50: If b2 > 255 Then b2 = 255 r3 = MR - 50: If r3 < 0 Then r3 = 0 g3 = MG - 50: If g3 < 0 Then g3 = 0 b3 = MB - 50: If b3 < 0 Then b3 = 0 .Label2.BackColor = RGB(MR, MG, MB) .Label3.BackColor = RGB(r3, g3, b3) .Picture1.BackColor = RGB(MR, MG, MB) .Pic1(0).BackColor = RGB(MR, MG, MB) .Pic1(1).BackColor = RGB(MR, MG, MB) .Pic1(2).BackColor = RGB(MR, MG, MB) .Label1(0).BackColor = RGB(MR, MG, MB) .Label1(1).BackColor = RGB(MR, MG, MB) .Label1(2).BackColor = RGB(MR, MG, MB) .Label1(0).ForeColor = RGB(MR Xor 255, MG Xor 255, MB Xor 255) .Label1(1).ForeColor = RGB(MR Xor 255, MG Xor 255, MB Xor 255) .Label1(2).ForeColor = RGB(MR Xor 255, MG Xor 255, MB Xor 255) .Label2.ForeColor = RGB(MR Xor 255, MG Xor 255, MB Xor 255) .Label3.ForeColor = RGB(r2, g2, b2) MObj.BackColor = RGB(MR, MG, MB) Dim qq As Integer For qq = 0 To 2 .Label1(qq).Move 1, 1, .Pic1(qq).ScaleWidth - 2, .Pic1(qq).ScaleHeight - 2 .Pic1(qq).Line (0, 0)-(.Pic1(qq).ScaleWidth - 1, .Pic1(qq).ScaleHeight - 1), RGB(r2, g2, b2), B .Pic1(qq).Line (0, .Pic1(qq).ScaleHeight - 1)-(.Pic1(qq).ScaleWidth - 1, .Pic1(qq).ScaleHeight - 1), RGB(r3, g3, b3) .Pic1(qq).Line (.Pic1(qq).ScaleWidth - 1, .Pic1(qq).ScaleHeight - 1)-(.Pic1(qq).ScaleWidth - 1, 0), RGB(r3, g3, b3) Next qq MObj.Cls .Label2.Caption = Mtxt .Label3.Font = Mfont1 .Label1(0).Font = Mfont1 .Label1(1).Font = Mfont1 .Label1(2).Font = Mfont1 .Label2.Font = Mfont2 MObj.Move MposX, MposY, 4500, .Label2.Height + 1140 .Label3.Move 45, 45, MObj.Width - 90, 300 .Label3.Caption = " " & Mtitle .Label1(0).Caption = Mbut0 .Label1(1).Caption = Mbut1 .Label1(2).Caption = Mbut2 .Pic1(0).Top = MObj.Height - .Pic1(0).Height - 90 .Pic1(1).Top = MObj.Height - .Pic1(0).Height - 90 .Pic1(2).Top = MObj.Height - .Pic1(0).Height - 90 .Picture1.Top = (MObj.Height / 2) - (.Picture1.Height / 2) .Picture1.Picture = .ImageList1.ListImages(Micon).Picture .Pic1(1).Visible = False .Pic1(2).Visible = False .Pic1(0).Left = (MObj.Width / 2) - (.Pic1(0).Width / 2) If Mbut1 <> "" Then .Pic1(1).Visible = True If Mbut2 <> "" Then .Pic1(2).Visible = True If Mbut1 <> "" And Mbut2 <> "" Then .Pic1(0).Left = (MObj.Width / 2) - .Pic1(0).Width - (.Pic1(1).Width / 2) - 45 .Pic1(1).Left = (MObj.Width / 2) - (.Pic1(1).Width / 2) .Pic1(2).Left = (MObj.Width / 2) + (.Pic1(1).Width / 2) + 45 End If If Mbut1 <> "" And Mbut2 = "" Then .Pic1(0).Left = (MObj.Width / 2) - .Pic1(0).Width - 23 .Pic1(1).Left = (MObj.Width / 2) + 23 End If MObj.Line (15, 15)-(MObj.Width - 30, MObj.Height - 30), RGB(r2, g2, b2), B MObj.Line (15, MObj.Height - 30)-(MObj.Width - 30, MObj.Height - 30), RGB(r3, g3, b3) MObj.Line (MObj.Width - 30, MObj.Height - 30)-(MObj.Width - 30, 30), RGB(r3, g3, b3) MObj.Line (30, .Label3.Top + .Label3.Height)-(MObj.Width - 30, .Label3.Top + .Label3.Height), RGB(r3, g3, b3) MObj.Line (30, .Label3.Top + .Label3.Height + 15)-(MObj.Width - 30, .Label3.Top + .Label3.Height + 15), RGB(r2, g2, b2) End With MObj.Show 1 End Sub